package com.vogue.supplymall.match.domain.dao;

import java.util.List;

import com.vogue.supplymall.account.domain.model.User;
import com.vogue.supplymall.match.domain.model.MatchOrgan;
import com.vogue.supplymall.shop.domain.model.Shop;
import org.apache.ibatis.annotations.Select;

public interface MatchOrganDao extends BaseDao<MatchOrgan, Long>{
	/**
	 * 判断机构是否已存在</br>
	 * tyc</br>
	 * 2017-12-06</br>
	 * matchId 对接系统中的机构Id</br>
	 * sysCodeId 唯一注册号Id
	 * 
	 */
	public Long checkOrganIsExist(String matchId,Long sysCodeId);
	
	/**
	 * 根据注册号，得到所有该注册号下的机构对应的对接系统中的id，即matchid</br>
	 * tyc  </br>
	 * 2017-12-15
	 */
	public List<String> getAllOrganIdBySysCode(Long sysCodeId);
	
	/**
	 * 根据注册号和matchId删除机构信息
	 */
	public int deleteOrangInfo(String ids,Long sysCodeId);
	/**
	 * 根据注册号和matchId禁用店铺信息
	 */
	public int deleteShopInfo(String ids,Long sysCodeId);
	/**
	 * 更新上下级关系
	 */
	public int updatePId(Long sysCodeId);
	/**
	 * 根据sysCodeId,matchId获取对象MatchOrgan
	 */
	public MatchOrgan getMatchOrganByMatchId(Long sysCodeId,String matchId);
	/**
	 * 根据sysCodeId获取对象企业信息
	 */
	public MatchOrgan getEnterpriseByMatchId(Long sysCodeId);
	/**
	 * 根据matchId删除图片
	 */
	public int deleteOrganShopImgByMatchId(String matchId,Long syscodeId);
	/**
	 * 根据shopId删除分类
	 */
	public int deleteRelShopCategoryBySysCodeId(Long sysCodeId);
	/**
	 * 根据matchId删除用户
	 */
	//public int deleteUserByMatchId(String matchId);
	/**
	 * 根据matchId和syscodeid删除地址
	 */
	public int deleteAddressByMatchId(String matchId,Long  syscodeId);
	/**
	 * 根据organId删除机构
	 */
	public int deleteRelUserOrganByMatchId(String matchId,Long syscodeId);

	/**
	 * 根据syscodeid删除员工已不关联的仓库
	 */
	public int deleteStoreBySyscodeId(Long syscodeId);
	
	/**
	 * Count valid shop long.
	 * admin-business使用，查询所有开通的店铺
	 *
	 * @return the long
	 */
	Long countValidOrgan();
}
